package edu.zut.hb.ambition.report.impl;
import edu.zut.hb.ambition.base.service.impl.GenericManagerImpl;
import edu.zut.hb.ambition.base.service.impl.GenericTreeManagerImpl;

import edu.zut.hb.ambition.report.domain.Report;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Component;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;


import java.util.ArrayList;
import java.util.List;


@Component
@Transactional
public class ReportMangerImpl extends GenericManagerImpl<Report,Long>
        implements edu.zut.hb.report.service.ReportManger {

    ReportDao ReportDao;

    @Autowired
    public void setCartDao(ReportDao reportDao) {
        this.ReportDao = ReportDao;
        this.dao = this.ReportDao;
    }

    @Override
    public List list() {
        List list = new ArrayList();
        for (int i = 0; i < 100; i++) {
            Report report = new Report();
            report.setCode("report_"+i);
            report.setPrice(i);
            report.setEntityName("edu.zut.hb.fortune");
            list.add(report);
        }
        return list;
    }

}